import { createApp } from 'vue'
import App from './App.vue'
// UI组件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from "element-plus/lib/locale/lang/zh-cn";//中文
import './assets/style/reset.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import './assets/style/dark.css'
// 路由
import router from './router'
// 状态管理
import store from './store'
// 接口请求
import axios from 'axios'
import VueAxios from 'vue-axios'
// 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// svg组件
import SvgRaw from './components/svg/SvgRaw.vue'
// 图片剪切
import VueCropper from 'vue-cropper'; 
import 'vue-cropper/dist/index.css'

const app = createApp(App)
// 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.component("SvgRaw",SvgRaw);

app.use(ElementPlus,{locale});//需要改变的地方，加入locale

app.use(VueAxios, axios)

app.use(router)

app.use(store)

app.use(VueCropper)

app.mount('#app')
